package com.huawei.appgallery.forum.forum.card;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.forum.base.card.ForumCard;
import com.huawei.appgallery.forum.forum.bean.ForumSectionInfoCardBean;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseCardBean;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import o.azb;
import o.bun.c;
import o.cgz;
import o.chy;
import o.dof;
import o.eqx;
import o.evx;

public class ForumSectionInfoCard extends ForumCard {
    public ForumSectionInfoCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        ˏ((ImageView) view.findViewById(c.ᐧ));
        ॱ((TextView) view.findViewById(c.ᐝᐝ));
        ˊ((TextView) view.findViewById(c.ـ));
        this.ˊˋ = view.findViewById(c.ˊˋ);
        azb.ˊ(this.ˊˋ);
        ʽ(this.ˊˋ);
        return this;
    }

    public void w_() {
        eqx.ˏ(this.ʽॱ, this.ˊᐝ.ॱˌ(), "app_default_icon");
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof ForumSectionInfoCardBean) {
            ForumSectionInfoCardBean forumSectionInfoCardBean = (ForumSectionInfoCardBean) cardBean;
            if (dof.ʽ(forumSectionInfoCardBean.ˊ().ˏ())) {
                this.ʿ.setVisibility(4);
            } else {
                this.ʿ.setVisibility(0);
                this.ʿ.setText(forumSectionInfoCardBean.ˊ().ˏ());
            }
            if (dof.ʽ(String.valueOf(forumSectionInfoCardBean.ˊ().ˎ()))) {
                this.ˉ.setVisibility(4);
                return;
            }
            this.ˉ.setVisibility(0);
            this.ˉ.setText(String.valueOf(forumSectionInfoCardBean.ˊ().ˎ()));
        }
    }

    public void ˎ(BaseCardBean baseCardBean) {
        super.ˎ(baseCardBean);
    }

    public void ॱ(final chy o_chy) {
        ˉ().setOnClickListener(new evx(this) {
            final /* synthetic */ ForumSectionInfoCard ˎ;

            public void ˋ(View view) {
                o_chy.ˏ(0, this.ˎ);
            }
        });
    }
}
